from wenet.whisper.convert_whisper_to_wenet_config_and_ckpt import main
import whisper
from gxl_ai_utils.utils import utils_file


def convert_whisper_to_wenet(target_pt: str = './output/', source_pt: str = './data/whisper/tiny.pt',
                    whisper_model: str = 'tiny'):
    utils_file.makedir_sil(target_pt)
    utils_file.makedir_sil(source_pt)
    whisper.load_model(whisper_model, download_root=source_pt, device='cpu')
    main(target_pt, source_pt, whisper_model)

